function dropOut() {
    $("#dropOut").click(function () {
        LsyCookie.removeItem('loginUsername');
        var str = '您好，欢迎来到达墨商城！&nbsp;请先'+'<a href="login.html">'+'【登录】'+'</a>'+'或'+'<a href="register.html">'+'【注册】'+'</a>';
        $('#userInfo').html(str);
        alert('注销');
        window.location.href='index.html';
    });
}
function loginInit() {
    var user = LsyCookie.getItem('loginUsername');
    if (user) {
        user = user.substr(0, 8);
        var str = '您好，' + user + ' ' + '<a href="javascript:void(0)" id="dropOut" style="margin-left: 20px;color: #999999;">' + '退出' + '</a>';
        $('#userInfo').html(str);
    }
}
function checkLogin() {
    if (!LsyCookie.getItem('loginUsername')) {
        window.location.href = 'login.html';
    }
}